home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 June
/
PCWorld_2004-06_cd.bin
/
software
/
vyzkuste
/
koolmoves
/
kmsetup.exe
/
{app}
/
Motion Scripts
/
Spin
/
effect.txt
Wrap
Text File
|
2002-11-07
|
1KB
|
57 lines
mcN = "letter";
aLetters = new Array();
for (i = 0; i< numChar; i++)
{
aLetters[i+0] = i;
var letter = this[mcN +i];
letter._visible = true;
letter.init = letterInit;
letter.doEffect = effect;
letter.number = i;
}
function letterInit()
{
this.axis = this._parent.axis;
this.rate = this._parent.speed;
this.z_angle = 0;
this.numCir = this._parent.numCir;
}
function effect()
{
if (this.axis == "h")
{
this._xscale = Math.cos(this.z_angle)*100; this.z_angle += this.rate;
if (this.z_angle <-6.4 * this.numCir)
{
this.gotoAndStop("end");
}
}
if (this.axis == "v")
{
this._yscale = Math.cos(this.z_angle)*100; this.z_angle += this.rate;
if (this.z_angle <-6.4 * this.numCir)
{
this.gotoAndStop("end");
}
}
}
function shuffle()
{
return Math.floor(Math.random() * 3) -1;
}
if (random == 1)
{
aLetters.sort(shuffle);
}
if (reverse == 1)
{
aLetters.reverse();
}